package cate.common.table.farm.endless;

import cate.common.table.ESheet;
import cate.common.util.XT;

import java.util.ArrayList;
import java.util.List;

/** 无尽轮回buff选项 */
public class EndlessBuffSheet extends ESheet<EndlessBuffRow> {

    @Override
    public String getSheetName() {
        return "无尽试炼状态";
    }

    /**
     * 从库中随机抽取三个选项
     */
    public List<Integer> randomOptions() {
        List<Integer> enableList = new ArrayList<>();
        for (int i=1; i<=3; ++i) {
            List<Integer> skillIds = get(i).skillIds;
            if (skillIds.isEmpty()) {
                continue;
            }
            int idx = XT.randomIndex(skillIds.size());
            enableList.add(skillIds.get(idx));
        }
        return enableList;
    }
}
